<template>
  <div>
    Home component
    <el-button type="danger" @click="logout"> 退出 </el-button>
  </div>
</template>

<script>
export default {
  methods: {
    //退出登录，清空token，强制跳转
    logout(){
      window.sessionStorage.clear();
      this.$router.push('/login')
    }
  }
}
</script>

<style Lang="less" scoped>

</style>